#ifndef DIAGNOSTICFACTORY_H
#define DIAGNOSTICFACTORY_H

#include "../Diagnostic/Diagnostic1D.h"
#include "../Diagnostic/Diagnostic2D.h"
#include "../Diagnostic/Diagnostic3D.h"

class DiagnosticFactory 
{
public:

    static Diagnostic* create(PicParams* params_, ParallelMPI* pmpi_, Grid* grid_, PhysicalField* fields_, vector<Species*>* vecSpecies_, vector<Collision*>* vecCollision_, vector<PSI*>* vecPSI_)
    {
        Diagnostic* diag = NULL;

        if ( params_->geometry == "1d3v" )
        {
            diag = new Diagnostic1D(params_, pmpi_, grid_, fields_, vecSpecies_, vecCollision_, vecPSI_);
        }
        else if ( params_->geometry == "2d3v" )
        {
            diag = new Diagnostic2D(params_, pmpi_, grid_, fields_, vecSpecies_, vecCollision_, vecPSI_);
        }
        else if ( params_->geometry == "3d3v" )
        {
            diag = new Diagnostic3D(params_, pmpi_, grid_, fields_, vecSpecies_, vecCollision_, vecPSI_);
        }
        else
        {
            log_error<<"Unknwon geometry : " << params_->geometry;
        }

        return diag;
    }


};

#endif
